import requests
head = {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"}
a = input("请输入你要查询的电话号码：")
data = {
    'mobile': a,
    'action': 'mobile'
}
r = requests.get('https://www.ip138.com/mobile.asp',params=data,headers=head)
r.encoding = r.apparent_encoding
print(r.status_code)
print(r.text)